/*
package com.ming.multifunction.mq;

import com.rabbitmq.client.Channel;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.stereotype.Component;
import retrofit2.http.Header;

import javax.annotation.Resource;
@Slf4j
@Component
public class MyMessageConsumer {

    @Resource
    private RabbitTemplate rabbitTemplate;

    @SneakyThrows
    @RabbitListener(queues = {"demo_queue"},ackMode = "MANUAL")
    public void receiveMsg(String message, Channel channel,@Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag){
        log.info("receiveMsg message={}",message);
        channel.basicAck(deliveryTag,false);
    }

}
*/
